import Vue from "vue"
import VueRouter from "vue-router"
Vue.use(VueRouter)

import Home from "../views/Home.vue"
import Comment from "../views/Comment.vue"
import Search from "../views/Search.vue"

const routes = [
  {
    path: "/",
    redirect: "/home"

  },
  {
    path: "/home",
    component: Home,
    meta: {
      title: "首页"
    }
  },
  {
    path: "/comment",
    component: Comment,
    meta: {
      title: "评论"
    }
  }, {
    path: "/search",
    component: Search,
    meta: {
      title: "搜索"
    }
  }
]
const router = new VueRouter({
  routes
})
export default router